$(function() {
	
	var hiddle_group_id = $("#hiddle_group_id").val();
	$("select[name='group']").val(hiddle_group_id);
	$("input[name='password']").val("");
	
	// 提交
	$(".submit_btn").click(function() {
		var real_name = $("input[name='real_name']").val();
		var password = $("input[name='password']").val();
		
		var flag = true;
		if(password != ''){
			if(password.length<6 || password.length>16){
				$("#validation_password").addClass("has-error");
				flag = false;
			}else{
				$("#validation_password").removeClass("has-error");
			}
		}
		if(real_name == '' || real_name.length<1 || real_name.length>15){
			$("#validation_real_name").addClass("has-error");
			flag = false;
		}else{
			$("#validation_real_name").removeClass("has-error");
		}
		
		if(flag == false){
			return false;
		}
		
		$("#form_modify").submit();
	});
});